import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import 'normalize.css';
import './styles/index.scss';
import components from "./utils/components";
//导入富文本编辑器
import VueQuillEditor from 'vue-quill-editor'
//导入富文本编辑器的样式
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
Vue.use(components);
//将富文本编辑器注册未全局主件
Vue.use(VueQuillEditor)
/**
 * 时间格式化
 */
Vue.filter('dateFormat', function (originVal) {
  const dt = new Date(originVal);
  const y = dt.getFullYear();
  const m = (dt.getMonth() + 1 + '').padStart(2, '0');
  const d = (dt.getDate() + '').padStart(2, '0');
  const hh = (dt.getHours() + '').padStart(2, '0');
  const mm = (dt.getMinutes() + '').padStart(2, '0');
  const ss = (dt.getSeconds() + '').padStart(2, '0');
  return `${y}-${m}-${d} ${hh}:${mm}:${ss}`
});

Vue.mixin({
  data() {
    return {
      /**
     * 数据列表
     */
      list: [],
      /**
       *查询loading
       */
      queryLoading: false,
    }
  }
})

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
